Skip to content

Add Chainhook integration for real-time event indexing#177

Merged
Mosas2000 merged 3 commits intomainfrom
feature/chainhook-integration
Feb 26, 2026
Merged

Add Chainhook integration for real-time event indexing#177
Mosas2000 merged 3 commits intomainfrom
feature/chainhook-integration

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Summary

Replace polling-based data retrieval with Chainhook event-driven indexing for real-time tip tracking.

Changes

  • Predicate config: Listens for all print events from the mainnet tipstream contract
  • Callback server: Lightweight Node.js HTTP server that receives webhook payloads, indexes events, and serves them via REST API
  • REST endpoints: /api/tips, /api/tips/:id, /api/tips/user/:address, /api/stats
  • Documentation: Setup guide, architecture diagram, API reference, and frontend integration patterns

Files Added

  • chainhook/tipstream-events.chainhook.json
  • chainhook/server.js
  • chainhook/package.json
  • chainhook/README.md

Closes #67

Configure Chainhook predicate to listen for all print events from
the deployed tipstream contract. Events are delivered via HTTP POST
to the callback server with bearer token authentication.
Implement a lightweight HTTP server that receives Chainhook webhook
payloads, extracts contract events, and stores them in a JSON file.
Expose REST endpoints for querying tips by ID, by user address,
with pagination, and for aggregated platform statistics.
Document setup instructions, environment variables, predicate
configuration, indexed event types, API endpoints, and frontend
integration patterns for the Chainhook event indexer.
@Mosas2000 Mosas2000 merged commit 0a2f3b3 into main Feb 26, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No Chainhook integration for real-time event indexing

1 participant